package com.movie.service.impl;

import com.movie.model.Movie;
import com.movie.model.Screening;
import com.movie.model.Ticket;
import com.movie.service.DataService;
import com.movie.util.DataUtil;
import java.util.List;

abstract class DataServiceImpl implements DataService {
    private DataUtil dataUtil;

    public DataServiceImpl(DataUtil dataUtil) {
        this.dataUtil = dataUtil;
    }

    @Override
    public void saveMovies(List<Movie> movies) {
        dataUtil.saveMovies(movies);
    }

    @Override
    public List<Movie> loadMovies() {
        return dataUtil.loadMovies();
    }

    @Override
    public void saveScreenings(List<Screening> screenings) {
        dataUtil.saveScreenings(screenings);
    }

    @Override
    public List<Screening> loadScreenings() {
        return dataUtil.loadScreenings();
    }

    @Override
    public void saveTickets(List<Ticket> tickets) {
        dataUtil.saveTickets(tickets);
    }

    @Override
    public List<Ticket> loadTickets() {
        return dataUtil.loadTickets();
    }
}